package com.goktech.controller;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;

import com.goktech.service.UserService;

/**

 * 
 * @author yangbo
 *
 */
@Controller
@RequestMapping("user")
public class HelloWorldController {

	// @Autowired
	// private UserService UserService;

	@RequestMapping("/helloWorld")
	public ModelAndView helloWorld() {
		ModelAndView mav = new ModelAndView("user/user");
		mav.addObject("message", "Spring MVC ");
		return mav;
	}

	@RequestMapping("/user")
	public String user(Model model) {
		model.addAttribute("message", "MIX World!");
		return "user/user";
	}
}
